<!--
 (c) Copyright Ascensio System SIA 2020

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
<!DOCTYPE html>
<html lang="en">
    <head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
		<title>Example search and change background text</title>
        
		<style type="text/css">
			html, body {
				margin: 0px;
				padding: 0px;
				overflow: hidden;
				width:100%;
				height:100%;
			}
			.search {
				/* outline-color: #7d858c; */
				width: calc(100% - 20px);
				margin : 5px;
				/* border: 1px solid #cfcfcf; */

			}
			.search::selection {
				background: #D8DADC; /* WebKit/Blink Browsers */
			}
			.search::-moz-selection {
				background: #D8DADC; /* Gecko Browsers */
			}
			.buttons {
				display: flex;
				flex-flow: column;
			}
			div {
				margin : 5px;
			}
			.navigation {
				display: flex;
				justify-content: flex-end;
			}
			button {
				color: #fff;
				background-color: #7d858c;
				border: 1px solid #cfcfcf;
				border-radius: 2px;
				outline: none;
				font-size: 13px;
				font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
				height: 27px !important;
				cursor: pointer;
				margin-left : 3px;
			}
			label {
				font-size: 13px;
				margin: 5px;
			}
			.color {
				border: 1px solid;
				border-color: #7d858c;
				display: flex;
				flex-flow: column;
			}
		</style>

		<script type="text/javascript" src="https://onlyoffice.github.io/sdkjs-plugins/v1/plugins.js"></script>
		<script type="text/javascript" src="https://onlyoffice.github.io/sdkjs-plugins/v1/plugins-ui.js"></script>
		<link rel="stylesheet" href="https://onlyoffice.github.io/sdkjs-plugins/v1/plugins.css">
		<script type="text/javascript" src="scripts/code.js"></script>

    </head>
    <body>
		<div>
			<input placeholder="Enter your text here" id="inp_search" class="search form-control">
		</div>
		<div class="buttons">
			<!-- <div class="navigation">
				<button id="btn_prev" title="Previous result of search">Prev</button>
				<button id="btn_next" title="Next result of search">Next</button>
			</div> -->
			
			<div class="color">
				<label class="header">Color block</label>
				<div style="display: flex; justify-content: center;">
					<input type="color" title="Choose background color" name="background" id="inp_color">
					<button id="btn_resetColor" class="btn-text-default" title="Reset background for setected text to default">Reset</button>
					<button id="btn_bg" class="btn-text-default" title="Set background for selected text">Color</button>
					<button id="btn_bgAll" class="btn-text-default" title="Set backgound for all searched results">Color all</button>
				</div>
			</div>
		</div>
    </body>
</html>